
export default function (userAgent) {
  if (!userAgent) return {};
  let Sys = {};
  let ua = userAgent.toLowerCase();
  let s;
  s = ua.match(/msie ([\d.]+)/);
  if (s) Sys.ie = s[1];
  s = ua.match(/firefox\/([\d.]+)/);
  if (s) Sys.firefox = s[1];
  s = ua.match(/chrome\/([\d.]+)/);
  if (s) Sys.chrome = s[1];
  s = ua.match(/opera.([\d.]+)/);
  if (s) Sys.opera = s[1];
  s = ua.match(/version\/([\d.]+).*safari/);
  if (s) Sys.safari = s[1];
  return Sys;
}
